package com.cstp.exception;

import lombok.Getter;


/**
 * @author watts
 */
public class ServiceException extends RuntimeException {

    @Getter
    private final int code;

    @Getter
    private final String message;

    public ServiceException(String message, int code) {
        super(message);
        this.code = code;
        this.message = message;
    }

    public ServiceException(String message) {
        super(message);
        this.code = -1;
        this.message = message;
    }

}
